package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the check_withcard database table.
 * 
 */
@Entity
@Table(name="check_withcard")
@NamedQuery(name="CheckWithcard.findAll", query="SELECT c FROM CheckWithcard c")
public class CheckWithcard implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="withcard_id")
	private int withcardId;

	@Temporal(TemporalType.DATE)
	@Column(name="effectiva_date")
	private Date effectivaDate;
	
	@OneToOne
	@JoinColumn(name="emp_id")
	private Emp emp;

	@Temporal(TemporalType.DATE)
	@Column(name="expiry_date")
	private Date expiryDate;

	private String state;
	
	private String maker;

	@Temporal(TemporalType.DATE)
	@Column(name="make_time")
	private Date makeTime;

	@Column(name="update_emp")
	private String updateEmp;

	@Temporal(TemporalType.DATE)
	@Column(name="update_time")
	private Date updateTime;

	//bi-directional many-to-one association to CheckAccount
	@ManyToOne
	@JoinColumn(name="account_id")
	private CheckAccount checkAccount;

	
	public CheckWithcard() {
	}

	@Override
	public String toString() {
		return "CheckWithcard [withcardId=" + withcardId + ", effectivaDate=" + effectivaDate + ", expiryDate="
				+ expiryDate + ", state=" + state + ", maker=" + maker + ", makeTime=" + makeTime + ", updateEmp="
				+ updateEmp + ", updateTime=" + updateTime + "]";
	}

	public int getWithcardId() {
		return this.withcardId;
	}

	public void setWithcardId(int withcardId) {
		this.withcardId = withcardId;
	}

	public Date getEffectivaDate() {
		return this.effectivaDate;
	}

	public void setEffectivaDate(Date effectivaDate) {
		this.effectivaDate = effectivaDate;
	}


	public Emp getEmp() {
		return emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

	public Date getExpiryDate() {
		return this.expiryDate;
	}

	public void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public CheckAccount getCheckAccount() {
		return this.checkAccount;
	}

	public void setCheckAccount(CheckAccount checkAccount) {
		this.checkAccount = checkAccount;
	}
	public String getMaker() {
		return maker;
	}

	public void setMaker(String maker) {
		this.maker = maker;
	}

	public Date getMakeTime() {
		return makeTime;
	}

	public void setMakeTime(Date makeTime) {
		this.makeTime = makeTime;
	}

	public String getUpdateEmp() {
		return updateEmp;
	}

	public void setUpdateEmp(String updateEmp) {
		this.updateEmp = updateEmp;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}